<!--添加栏目-->
<div class="dialog_content">
	<form id="info_form" action="{:U('article/cate_add')}" method="post">
		<table width="100%" class="table_form">
			<tr>
				<th>分类名称 :</th>
				<td><input type="text" name="name" id="name" class="input-text" size="30" value="{$info.name}"></td>
			</tr>

			<tr>
				<th>是否启用 :</th>
				<td>
					<label><input type="radio" name="status" value="1" <if condition="$info.status eq 1">checked</if>> 是</label>&nbsp;&nbsp;
					<label><input type="radio" name="status" value="2" <if condition="$info.status eq 2">checked</if>> 否</label>
				</td>
			</tr>
			<tr>
				<th>Title :</th>
				<td><input type="text" name="seo_title" id="seo_title" class="input-text" style="width:300px;" value="{$info.seo_title}"></td>
			</tr>
			<tr>
				<th>Keywords :</th>
				<td><input type="text" name="seo_keys" id="seo_keys" class="input-text" style="width:300px;" value="{$info.seo_keys}"></td>
			</tr>
			<tr>
				<th>Description :</th>
				<td><textarea name="seo_desc" style="width:300px; height:50px;">{$info.seo_desc}</textarea></td>
			</tr>
		</table>
		<input type="hidden" name="id" value="{$info.id}">
	</form>
</div>
<script>
$(function(){
	$.formValidator.initConfig({formid:"info_form",autotip:true});
	$("#name").formValidator({onshow:lang.please_input+'分类名称',onfocus:lang.please_input+'分类名称'}).inputValidator({min:1,onerror:lang.please_input+'分类名称'});

	$('#info_form').ajaxForm({success:complate,dataType:'json'});
	function complate(result){
		if(result.errNum === 0){
			$.dialog.get('cate_add').close();
			$.yhxia.tip({content:result.retData});
			window.location.reload();
		} else {
			$.yhxia.tip({content:result.errMsg, icon:'alert'});
		}
	}
});
</script>